package com.vast.ui.component.toolbar;

import org.eclipse.jface.action.Action;

import com.vast.metrix.viewer.bustraffic.Activator;
import com.vast.metrix.viewer.bustraffic.views.ViewPart;


public abstract class ToolBarAction extends AbstractToolBarAction {
	private final Action          openFileAction;
	
	
	public ToolBarAction(final ViewPart view) {
		super(view);
		openFileAction = new Action() {
			public void run() {
				openFileAction();
			}
		};
		openFileAction.setEnabled(true);
		openFileAction.setImageDescriptor(Activator.getDefault().getImageRegistry().getDescriptor("OPEN_CSV_FILE"));
		openFileAction.setText("Open .csv file");	
		
		toolbar.add(openFileAction);
		//toolbar.add(startRecordAction);
		//toolbar.add(pauseRecordAction);
		//toolbar.add(startChartAction);
		//toolbar.add(pauseChartAction);
		//toolbar.add(startAction);
		//toolbar.add(stopAction);
		//toolbar.add(addAction);
		//toolbar.add(deleteAction);
	}
	
	

	public abstract void openFileAction();

	public void openFileActionEnable(boolean isEnabled) {
		// TODO Auto-generated method stub
		openFileAction.setEnabled(isEnabled);
	}

}
